/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package stemmingnaziefandriani;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Asep Sucipto
 */
public class NaziefAndriani {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        String test="kita berPakaian, meNggunakan. * Baju/ / #$ bagus ada baju BAgus terdepan bajupun, terluka Cinta tangisan Yankan";
        String hasil1, hasil2, hasil4;
        ArrayList hasil3= new ArrayList<String>();
        ArrayList hasil5= new ArrayList<String>();
        HashMap map = new HashMap<String, Integer>();
        try {
              OlahDokumen olahDokumen = new OlahDokumen();
              StemmingNaziefAndriani obj = new StemmingNaziefAndriani();
              hasil1=olahDokumen.caseFolding(test); 
              System.out.println(hasil1);
              hasil2=olahDokumen.bersihkanStopword(hasil1); 
              System.out.println(hasil2);
              hasil3=olahDokumen.token(hasil2); 
              System.out.println(hasil3);
              obj.bacaKamus();
             for (Object s : hasil3) {
             obj.setKata(String.valueOf(s));
             hasil4=obj.KataDasar(String.valueOf(s)); 
             System.out.println(hasil4);
             hasil5.add(hasil4);
              }
              map=olahDokumen.frekuensi(hasil5); 
              System.out.println(map);
           
              
        } catch (FileNotFoundException ex) {
            Logger.getLogger(NaziefAndriani.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(NaziefAndriani.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}
